package jpa.entitys.promis.construction;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the SUPPLIER_DBNOTE_BUDGET database table.
 * 
 */
@Embeddable
public class SupplierDbnoteBudgetPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private String company;

	private String project;

	@Column(name="DEBIT_NOTE_TYPE")
	private String debitNoteType;

	@Column(name="DEBIT_NOTE_SERIES")
	private String debitNoteSeries;

	@Column(name="DEBIT_NOTE_NO")
	private long debitNoteNo;

	private long seq;

    public SupplierDbnoteBudgetPK() {
    }
	public String getCompany() {
		return this.company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	public String getProject() {
		return this.project;
	}
	public void setProject(String project) {
		this.project = project;
	}
	public String getDebitNoteType() {
		return this.debitNoteType;
	}
	public void setDebitNoteType(String debitNoteType) {
		this.debitNoteType = debitNoteType;
	}
	public String getDebitNoteSeries() {
		return this.debitNoteSeries;
	}
	public void setDebitNoteSeries(String debitNoteSeries) {
		this.debitNoteSeries = debitNoteSeries;
	}
	public long getDebitNoteNo() {
		return this.debitNoteNo;
	}
	public void setDebitNoteNo(long debitNoteNo) {
		this.debitNoteNo = debitNoteNo;
	}
	public long getSeq() {
		return this.seq;
	}
	public void setSeq(long seq) {
		this.seq = seq;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof SupplierDbnoteBudgetPK)) {
			return false;
		}
		SupplierDbnoteBudgetPK castOther = (SupplierDbnoteBudgetPK)other;
		return 
			this.company.equals(castOther.company)
			&& this.project.equals(castOther.project)
			&& this.debitNoteType.equals(castOther.debitNoteType)
			&& this.debitNoteSeries.equals(castOther.debitNoteSeries)
			&& (this.debitNoteNo == castOther.debitNoteNo)
			&& (this.seq == castOther.seq);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.company.hashCode();
		hash = hash * prime + this.project.hashCode();
		hash = hash * prime + this.debitNoteType.hashCode();
		hash = hash * prime + this.debitNoteSeries.hashCode();
		hash = hash * prime + ((int) (this.debitNoteNo ^ (this.debitNoteNo >>> 32)));
		hash = hash * prime + ((int) (this.seq ^ (this.seq >>> 32)));
		
		return hash;
    }
}